/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financial.entity.ttpaymentorder;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.cars.Tcar;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * TT付款单Entity
 * @author Kilo
 * @version 2021-03-10
 */
@Table(name="t_tt_payment_order_detail", alias="a", columns={
		@Column(name="tt_payment_order_detail_id", attrName="ttPaymentOrderDetailId", label="TT付款单明细ID", isPK=true),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="model", attrName="model", label="车型"),
		@Column(name="unit_price", attrName="unitPrice", label="外币单价"),
		@Column(name="rmb_equivalent", attrName="rmbEquivalent", label="等值人民币价额"),
		@Column(name="telegram_fee", attrName="telegramFee", label="电报费"),
		@Column(name="handling_fee", attrName="handlingFee", label="手续费"),
		@Column(name="tt_payment_order_id", attrName="ttPaymentOrderId.ttPaymentOrderId", label="TT付款单ID"),
	}, joinTable={
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="b",
				on="b.car_id = a.car_id", columns={
				@Column(name="car_id", label="车辆编码", isPK=true),
				@Column(name="car_name", label="车辆名称", isQuery=false),
		}),
	},orderBy="a.tt_payment_order_detail_id ASC"
)
public class TtPaymentOrderDetail extends DataEntity<TtPaymentOrderDetail> {
	
	private static final long serialVersionUID = 1L;
	private String ttPaymentOrderDetailId;		// TT付款单明细ID
	private String carId;		// 车辆
	private String frameNumber;		// 车架号
	private String model;		// 车型
	private Double unitPrice;		// 外币单价
	private TtPaymentOrder ttPaymentOrderId;		// TT付款单ID 父类
	private Tcar tcar;
	private Double rmbEquivalent;
	private Double telegramFee;
	private Double handlingFee;
	private Long rowNumber;//服务订单行号

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}


	public Double getRmbEquivalent() {
		return rmbEquivalent;
	}

	public void setRmbEquivalent(Double rmbEquivalent) {
		this.rmbEquivalent = rmbEquivalent;
	}

	public Double getTelegramFee() {
		return telegramFee;
	}

	public void setTelegramFee(Double telegramFee) {
		this.telegramFee = telegramFee;
	}

	public Double getHandlingFee() {
		return handlingFee;
	}

	public void setHandlingFee(Double handlingFee) {
		this.handlingFee = handlingFee;
	}

	public Tcar getTcar() {
		return tcar;
	}

	public void setTcar(Tcar tcar) {
		this.tcar = tcar;
	}

	public TtPaymentOrderDetail() {
		this(null);
	}


	public TtPaymentOrderDetail(TtPaymentOrder ttPaymentOrderId){
		this.ttPaymentOrderId = ttPaymentOrderId;
	}
	
	public String getTtPaymentOrderDetailId() {
		return ttPaymentOrderDetailId;
	}

	public void setTtPaymentOrderDetailId(String ttPaymentOrderDetailId) {
		this.ttPaymentOrderDetailId = ttPaymentOrderDetailId;
	}
	
	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}
	
	@Length(min=0, max=100, message="车型长度不能超过 100 个字符")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	@NotNull(message="外币单价不能为空")
	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}
	
	public TtPaymentOrder getTtPaymentOrderId() {
		return ttPaymentOrderId;
	}

	public void setTtPaymentOrderId(TtPaymentOrder ttPaymentOrderId) {
		this.ttPaymentOrderId = ttPaymentOrderId;
	}
	
}